<?php

/**
 * clientes form base class.
 *
 * @package    gescell
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseclientesForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                 => new sfWidgetFormInputHidden(),
      'clientestipo_id'    => new sfWidgetFormPropelChoice(array('model' => 'clientestipo', 'add_empty' => false)),
      'nombre'             => new sfWidgetFormInput(),
      'apellido'           => new sfWidgetFormInput(),
      'ruc'                => new sfWidgetFormInput(),
      'direccion'          => new sfWidgetFormInput(),
      'ciudad'             => new sfWidgetFormInput(),
      'otrainfo'           => new sfWidgetFormInput(),
      'telefonoparticular' => new sfWidgetFormInput(),
      'telefonooficina'    => new sfWidgetFormInput(),
      'correo1'            => new sfWidgetFormInput(),
      'correo2'            => new sfWidgetFormInput(),
      'created_at'         => new sfWidgetFormDateTime(),
      'updated_at'         => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'                 => new sfValidatorPropelChoice(array('model' => 'clientes', 'column' => 'id', 'required' => false)),
      'clientestipo_id'    => new sfValidatorPropelChoice(array('model' => 'clientestipo', 'column' => 'id')),
      'nombre'             => new sfValidatorString(array('max_length' => 25)),
      'apellido'           => new sfValidatorString(array('max_length' => 25, 'required' => false)),
      'ruc'                => new sfValidatorString(array('max_length' => 20)),
      'direccion'          => new sfValidatorString(array('max_length' => 30, 'required' => false)),
      'ciudad'             => new sfValidatorString(array('max_length' => 30, 'required' => false)),
      'otrainfo'           => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'telefonoparticular' => new sfValidatorString(array('max_length' => 50, 'required' => false)),
      'telefonooficina'    => new sfValidatorString(array('max_length' => 50, 'required' => false)),
      'correo1'            => new sfValidatorString(array('max_length' => 50, 'required' => false)),
      'correo2'            => new sfValidatorString(array('max_length' => 50, 'required' => false)),
      'created_at'         => new sfValidatorDateTime(array('required' => false)),
      'updated_at'         => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('clientes[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'clientes';
  }


}
